use serde::{Serialize,Deserialize};
use serde_json::Value;


/// 用户的信息
/// * 接口：`https://api.uyiban.com/base/c/auth/yiban`
/// * 方式:GET
/// * 查询参数:CSRF,verifyRequest
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UserIdentity {
    #[serde(rename = "UniversityName")]
    pub university_name: String,
    #[serde(rename = "UniversityId")]
    pub university_id: String,
    #[serde(rename = "PersonId")]
    pub person_id: String,
    #[serde(rename = "PersonName")]
    pub person_name: String,
    #[serde(rename = "State")]
    pub state: i64,
    #[serde(rename = "PersonType")]
    pub person_type: String,
    #[serde(rename = "UniversityIcon")]
    pub university_icon: String,
    #[serde(rename = "Container")]
    pub container: String,
    #[serde(rename = "HomeTheme")]
    pub home_theme: String,
    #[serde(rename = "CustomApps")]
    pub custom_apps: CustomApps,
    #[serde(rename = "Group")]
    pub group: Vec<Value>,
    #[serde(rename = "Apps")]
    pub apps: Vec<App>,
    #[serde(rename = "WxState")]
    pub wx_state: i64,
    #[serde(rename = "DingDingState")]
    pub ding_ding_state: i64,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CustomApps {
    pub up: Vec<Value>,
    pub down: Vec<Value>,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct App {
    #[serde(rename = "Id")]
    pub id: String,
    #[serde(rename = "ServiceId")]
    pub service_id: String,
    #[serde(rename = "AppIcon")]
    pub app_icon: String,
    #[serde(rename = "AppUrl")]
    pub app_url: String,
    #[serde(rename = "AppRuleUrl")]
    pub app_rule_url: String,
    #[serde(rename = "AuthCode")]
    pub auth_code: String,
    #[serde(rename = "AppName")]
    pub app_name: String,
}
